package com.star.star.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.star.star.dto.StarArtLogPageDTO;
import com.star.star.entity.StarArtLog;
import com.star.star.mapper.StarArtLogMapper;
import com.star.star.service.StarArtLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.star.star.vo.StarArtLogPageVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 作品状态变更记录 服务实现类
 *
 * @author yangzj
 */
@Service
public class StarArtLogServiceImpl extends ServiceImpl<StarArtLogMapper, StarArtLog> implements StarArtLogService {

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void writeBatch(List<StarArtLog> logs) {
        this.saveBatch(logs);
    }

    @Override
    public IPage<StarArtLogPageVO> page(StarArtLogPageDTO dto) {
        return baseMapper.page(dto);
    }
}
